package com.huslee.shark.alert.config;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.ArrayList;
import java.util.List;

/**
 * @Desc
 * @Author lishuai
 * @Create 2021/1/15
 */
@Data
@ConfigurationProperties(prefix = "basealert.dingtalk")
public class DingtalkConfigs {
    private List<DingtalkConfig> configs = new ArrayList<>();
    private List<String> blacklist = new ArrayList<>();
    private Boolean asyn = false;
    private Integer threads = 2;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class DingtalkConfig {
        private String name;
        private String webhook;
        private String secret;
    }
}
